/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jjrealestatevisitor.structure;

import java.util.ArrayList;
import jjrealestatevisitor.visitor.Visitable;
import jjrealestatevisitor.visitor.Visitor;

/**
 *
 * @author jochemsiegel
 */
public class Room implements Visitable {
    private int length;
    private int width;
    private String type;
    private ArrayList roomItems;

    public Room (int length, int width, String type) {
        this.length = length;
        this.width = width;
        this.type = type;
        
        this.roomItems = new ArrayList();
    }

    public int getLength() {
        return length;
    }

    public String getType() {
        return type;
    }

    public int getWidth() {
        return width;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    public void addRoomItem (RoomItem roomItem) {
        roomItems.add(roomItem);
    }

    public ArrayList getRoomItems() {
        return roomItems;
    }

}
